.vditor {
  display: flex;
  flex-direction: column;
  border: 1px solid $borderColor;
  border-radius: 3px;
  box-sizing: border-box;

  &--fullscreen {
    position: fixed;
    top: 0;
    width: 100% !important;
    left: 0;
    height: 100vh !important;
    z-index: 90;
    background-color: $fullscreenBg;
  }

  &-content {
    display: flex;
    min-height: 60px;
    flex: 1;
    position: relative;
  }

  &-textarea {
    flex: 1;
    border: 0;
    resize: none;
    padding: 10px;
    box-sizing: border-box;
    background-color: $textareaBg;
    outline: 0 none;
    font-size: 16px;
    line-height: 22px;
    color: $textareaColor;
    border-radius: 0 0 3px 3px;

    &[disabled] {
      opacity: 0.3;
      cursor: not-allowed;
    }

    &:focus {
      background-color: $textareaFocusBg;
    }
  }

  &-preview {
    flex: 1;
    background-color: $previewBg;
    overflow: auto;
    padding: 10px;
    box-shadow: inset 1px 0 $borderColor;
    box-sizing: border-box;
    border-radius: 0 0 3px 0;

    &::-webkit-scrollbar {
      display: none;
    }
  }

  &-counter {
    padding: 0 3px;
    position: absolute;
    bottom: 10px;
    right: 20px;
    color: $textareaColor;
    background-color: rgba($fullscreenBg, 0.6);
    border-radius: 3px;
    font-size: 12px;
    user-select: none;

    &--error {
      color: $errorColor;
      background-color: rgba($errorColor, 0.1);
    }
  }

  &-resize {
    padding: 1px 0;
    border-radius: 5px;
    cursor: row-resize;
    transition: all .15s ease-in-out;
    user-select: none;
    background-color: $resizeBg;

    &:hover {
      background-color: $resizeHoverBg;
      svg {
        color: $hoverColor;
      }
    }

    svg {
      fill: currentColor;
      stroke-width: 0;
      stroke: currentColor;
      width: 13px;
      height: 3px;
      display: block;
      margin: 0 auto;
      color: $toolbarIcon;
    }
  }

  &-upload {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 5px;
    left: 0;
    top: -3px;
    border-radius: 3px;
    overflow: hidden;
    transition: all .15s ease-in-out;

    &--tip {
      height: 20px;
      font-size: 12px;
      line-height: 20px;
      color: $hoverColor;
      opacity: 1 !important;

      .vditor-upload__close {
        position: absolute;
        right: 5px;
        top: 0;
        cursor: pointer;
        display: block;
      }

      .vditor-upload__progress {
        padding: 0 5px;
      }
    }

    &__close {
      display: none;
    }

    &__progress {
      height: 100%;
      background-color: rgba($hoverBg, 0.8);
      transition: all .15s ease-in-out;
    }
  }
}